import axios from 'axios'

// let base = 'http://ads.bestproperty.com.mm'
// let base = 'http://testadmin.dlintech.com'
// let base = 'api'
// let base = 'http://10.7.16.65:8080'
let base = ''
// 获取详情页面数据
export const details = params => { return axios.get(`${base}/manage/development/${params}/developer`) }
// 列表接口
export const developmentList = params => { return axios.get(`${base}/manage/development/list`, {params}) }
// 批量操作的接口
export const developmentStatus = (params) => { return axios.post(`${base}/manage/development/list/status`, params) }
// 获取开发商信息
export const developerManage = params => { return axios.get(`${base}/app/user/${params}`) }
// 上传公司头像
export const updateCompanyLogoUrl = `${base}/app/user/update-company-logo`

// 更新公司信息
export const updateCompanyMessage = (params) => {
  return axios.post(`${base}/app/user/company-info/update`, params)
}
// 上传开发商头像/修改名字
export const updateProfile = (params) => {
  return axios.post(`${base}/app/user/update`, params)
}
// 修改手机号
export const updatePhone = (params) => {
  return axios.post(`${base}/app/user/user/phone-reset`, params)
}

// 绑定google
export const bindingGoogle = (params) => {
  return axios.post(`${base}/app/user/binding_google`, params)
}

// 解除绑定google
export const unBindingGoogle = (params) => {
  return axios.post(`${base}/app/user/unbind_google`, params)
}

// 绑定facebook
export const bindingFacebook = (params) => {
  return axios.post(`${base}/app/user/binding_facebook`, params)
}

// 解除绑定facebook
export const unBindingFacebook = (params) => {
  return axios.post(`${base}/app/user/unbind_facebook`, params)
}

// 调用统计接口status
export const statusCount = params => { return axios.get(`${base}/manage/development/count`) }

// agent 接口部分
// 列表接口
export const transactionList = params => { return axios.get(`${base}/manage/transaction/list`, {params}) }

// 调用统计接口代理人  status
export const agenetStatusCount = params => { return axios.get(`${base}/manage/transaction/count`) }

// 批量操作的接口
export const agentDevelopmentStatus = (params) => { return axios.post(`${base}/manage/transaction/list/status`, params) }

// 获取代理人详情页面数据
export const agentDetails = params => { return axios.get(`${base}/manage/transaction/${params}/contact`) }

// 公司logo
export const companyPhotos = (params, config) => { return axios.post(`${base}/app/user/update-company-logo`, params, config) }

// 用户密码重置
export const resetPassword = (params) => {
  return axios.post(`${base}/app/user/reset-password`, params)
}

// 发送绑定邮箱
export const sendBindEmail = (params) => {
  return axios.post(`${base}/app/user/send-email-bind`, params)
}

// 发送修改邮箱
export const sendChangeEmail = (params) => {
  return axios.post(`${base}/app/user/send-update-email`, params)
}

// 修改密码
export const updatePassword = (params) => {
  return axios.post(`${base}/app/user/update-password`, params)
}
